package com.lwl.blog.web.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 页面跳转
 */
@Controller
public class PageController {

    /*1层路径*/
    @GetMapping("/{page}.html")
    public String page1(@PathVariable String page) {
        return page;
    }

    /*2层路径*/
    @GetMapping("/{model}/{page}.html")
    public String page2(@PathVariable String page, @PathVariable String model) {
        return model + "/" + page;
    }

    /*3层路径*/
    @GetMapping("/{path}/{model}/{page}.html")
    public String page3(@PathVariable String page, @PathVariable String model, @PathVariable String path) {
        return path + "/" + model + "/" + page;
    }


}
